<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>渠道来源管理</title>
	<meta name="decorator" content="default" />
	<script type="text/javascript">
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
        function qr(url,na){
            top.$.jBox.open("iframe:"+url,na+"的二维码",431,521,{
                buttons:{"关闭":true}, loaded:function(h){
                    $(".jbox-content", top.document).css("overflow-y","hidden");
                }
            });
		}
	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<shiro:hasPermission name="business:channel:view">
	<li class="active"><a href="${ctx}/business/channel/">渠道来源列表</a></li>
	</shiro:hasPermission>
	<shiro:hasPermission name="business:channel:edit">
		<li><a href="${ctx}/business/channel/form?sort=10">渠道来源添加</a></li>
	</shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="channel"
		   action="${ctx}/business/channel/" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
	<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" />
	<label>名称  ：</label>
	<form:input path="name" htmlEscape="false" maxlength="50" class="input-medium" />
	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询" />
</form:form>
<tags:message content="${message}" />
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
	<tr>
			<%--<th>ID</th>--%>
			<th>公司名称</th>
			<th>名称</th>
			<th>状态</th>
			<th>创建人</th>
			<th>创建日期</th>
			<th>备注</th>
	<%--		<th>修改人</th>
			<th>更新日期</th>--%>
		<shiro:hasPermission name="business:channel:edit">
			<th>操作</th>
		</shiro:hasPermission>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="channel">
		<tr id="${channel.id}">
				<%--<td><a href="${ctx}/business/channel/form?id=${channel.id}">${channel.id}</a></td>--%>
				<td>${channel.office.name}</td>
				<td>${channel.name}</td>
				<td>${dic:getLabelByValue(channel.status,"channel_status")}</td>
				<td>${channel.createBy}</td>
				<td>${channel.createDate}</td>
				<td>${channel.remarks}</td>
				<%--<td>${channel.updateBy}</td>
				<td>${channel.updateDate}</td>--%>
				<td>
					<shiro:hasPermission name="business:channel:edit">
					<a href="${ctx}/business/channel/form?id=${channel.id}">修改</a>
					</shiro:hasPermission>
					<shiro:hasPermission name="business:channel:delete">
					<a href="${ctx}/business/channel/delete?id=${channel.id}"
					   onclick="return confirmx('确认要删除该字典吗？', this.href)">删除</a>
					</shiro:hasPermission>
					<shiro:hasPermission name="business:channel:seeqrcode">
					<a href="javascript:;" onclick="qr('${channel.qrCode}','${channel.name}')">查看二维码</a>
					</shiro:hasPermission>
				</td>
		</tr>
	</c:forEach>
	</tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>